﻿using System;
using System.Collections.Generic;
using System.Data.Objects;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Server_Code.Model;

namespace Server_Code
{
    public partial class Detail : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            string id = Request.QueryString["id"];
            if (!string.IsNullOrEmpty(id))
            {
                int i = int.Parse(id);
                DatabaseEntities db = new DatabaseEntities();
                IQueryable < Emergency > objectQuery = db.Emergencies.Where(x => x.ID == i);

                DetailsView.DataSource = objectQuery;
                DetailsView.DataBind();

            }
        }
    }
}